package com.example.rxjavautildemo.entity;

import android.os.Looper;

public class Event {
    private String eventName;
    private String content;

    public Event(String eventName, String content) {
        this.eventName = eventName;
        this.content = content;
    }

    public String getEventName() {
        return eventName;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "携带数据：{EventName:" + eventName + ", Content:" + content + "},当前线程状态：" + getLooperStatus();
    }

    public static String getLooperStatus(){
        return Looper.myLooper() == Looper.getMainLooper() ? "主线程" : "子线程";
    }
}
